import request from '@/utils/request'

export function getSchoolList(params) {
  return request({
    url: '/getSchools',
    method: 'get',
    params
  })
}

export function deleteSchool(school_id) {
  return request({
    url: `/deleteSchool/${school_id}`,
    method: 'delete'
  })
}

export function addSchool(data) {
  const { school_name, address, area_code } = data;
  return request({
    url: '/addSchool',
    method: 'post',
    data: {
      school_name, address, area_code
    },
    headers: {
      'Content-type': 'application/json; charset=utf-8'
    }
  })
}
